package main

import (
	"fmt"
	"io"
	"os"
)

var (
	// 函数作为变量存储
	myPrintf = func(w io.Writer, format string, a ...interface{}) (int, error) {
		return fmt.Fprintf(w, format, a...)
	}
)

func main() {
	fmt.Printf("%T\n", myPrintf) // func(io.Writer, string, ...interface {}) (int, error)
	myPrintf(os.Stdout, "%s\n", "Hello,Go")
}
